#include "mainwindow.h"
#include "login.h"
#include "Util.h"
#include "Logger.h"
#include <QString>

#include <QApplication>

//void ConnectToDatabase()
//{
//    QString host = "localhost";
//    QString dbName = "qt_db";
//    QString user = "T_Man";
//    QString password = "123456Test";
//    DatabasesManager dbm(host, dbName, user, password);

//    if(!dbm.open()) {
//        WLOG("数据库连接失败");
//        return ;
//    }
//}

void ConnectToMysql()
{
    QString host = "127.0.0.1";
    QString dbName = "qt_db";
    QString user = "T_Man";
    QString password = "123456Test";

    SqlUtil sql(host, dbName, user, password);
    sql.connectMySql();
}

int main(int argc, char *argv[])
{
    // ConnectToDatabase(); // 连接到数据库

    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    // ConnectToMysql();

    return a.exec();
}
